home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 10 / BBS In A Box Volume X (AMUG) (January 1994).bin / Files / Prog / U-Z / VideoToolBox.cpt / VideoToolboxSources / StringToDate.c < prev    next >
MacBinary  |  1993-02-22  |  1.9 KB  |  [TEXT/KAHL]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Mon Feb 22 23:33:42 1993, modified Mon Feb 22 23:33:42 1993, creator Think C, type ASCII, 1268 bytes "StringToDate.c" , at 0x574 428 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[KAHL]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0e 53 74 72 69 6e 67 | 54 6f 44 61 74 65 2e 63 |..String|ToDate.c|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 01 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 04 f4 00 | 00 01 ac a7 af 59 a6 a7 |........|.....Y..|
|00000060| af 59 a6 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.Y......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 81 e1 00 00 |........|........|
|00000080| 2f 2a 0d 53 74 72 69 6e | 67 54 6f 44 61 74 65 2e |/*.Strin|gToDate.|
|00000090| 63 0d 52 65 61 64 73 20 | 64 61 74 65 20 73 75 63 |c.Reads |date suc|
|000000a0| 68 20 61 73 20 22 36 2f | 33 30 2f 39 31 22 2c 20 |h as "6/|30/91", |
|000000b0| 6c 6f 61 64 73 20 64 61 | 74 65 20 73 74 72 75 63 |loads da|te struc|
|000000c0| 74 75 72 65 2c 20 61 6e | 64 20 72 65 74 75 72 6e |ture, an|d return|
|000000d0| 73 20 73 65 63 73 20 73 | 69 6e 63 65 20 31 2f 31 |s secs s|ince 1/1|
|000000e0| 2f 31 39 30 34 2e 0d 52 | 65 74 75 72 6e 73 20 4e |/1904..R|eturns N|
|000000f0| 41 4e 20 69 66 20 64 61 | 74 65 20 63 6f 75 6c 64 |AN if da|te could|
|00000100| 20 6e 6f 74 20 62 65 20 | 72 65 61 64 2e 0d 0d 48 | not be |read...H|
|00000110| 49 53 54 4f 52 59 3a 0d | 37 2f 32 37 2f 39 31 20 |ISTORY:.|7/27/91 |
|00000120| 64 67 70 09 77 72 6f 74 | 65 20 69 74 0d 38 2f 35 |dgp.wrot|e it.8/5|
|00000130| 2f 39 31 09 64 67 70 09 | 6d 61 64 65 20 63 6f 6d |/91.dgp.|made com|
|00000140| 70 61 74 69 62 6c 65 20 | 77 69 74 68 20 4d 50 57 |patible |with MPW|
|00000150| 20 43 20 33 2e 32 0d 38 | 2f 32 34 2f 39 31 09 64 | C 3.2.8|/24/91.d|
|00000160| 67 70 09 4d 61 64 65 20 | 63 6f 6d 70 61 74 69 62 |gp.Made |compatib|
|00000170| 6c 65 20 77 69 74 68 20 | 54 48 49 4e 4b 20 43 20 |le with |THINK C |
|00000180| 35 2e 30 2e 0d 31 32 2f | 31 33 2f 39 32 20 64 67 |5.0..12/|13/92 dg|
|00000190| 70 20 52 65 6d 6f 76 65 | 64 20 6f 62 73 6f 6c 65 |p Remove|d obsole|
|000001a0| 74 65 20 73 75 70 70 6f | 72 74 20 66 6f 72 20 54 |te suppo|rt for T|
|000001b0| 48 49 4e 4b 20 43 20 34 | 2e 0d 2a 2f 0d 23 69 6e |HINK C 4|..*/.#in|
|000001c0| 63 6c 75 64 65 20 22 56 | 69 64 65 6f 54 6f 6f 6c |clude "V|ideoTool|
|000001d0| 62 6f 78 2e 68 22 0d 23 | 69 6e 63 6c 75 64 65 20 |box.h".#|include |
|000001e0| 3c 53 63 72 69 70 74 2e | 68 3e 0d 0d 64 6f 75 62 |<Script.|h>..doub|
|000001f0| 6c 65 20 53 74 72 69 6e | 67 54 6f 44 61 74 65 28 |le Strin|gToDate(|
|00000200| 63 68 61 72 20 2a 73 74 | 72 69 6e 67 2c 44 61 74 |char *st|ring,Dat|
|00000210| 65 54 69 6d 65 52 65 63 | 20 2a 64 61 74 65 50 74 |eTimeRec| *datePt|
|00000220| 72 29 3b 0d 0d 64 6f 75 | 62 6c 65 20 53 74 72 69 |r);..dou|ble Stri|
|00000230| 6e 67 54 6f 44 61 74 65 | 28 63 68 61 72 20 2a 73 |ngToDate|(char *s|
|00000240| 74 72 69 6e 67 2c 44 61 | 74 65 54 69 6d 65 52 65 |tring,Da|teTimeRe|
|00000250| 63 20 2a 64 61 74 65 50 | 74 72 29 0d 7b 0d 09 4c |c *dateP|tr).{..L|
|00000260| 6f 6e 67 44 61 74 65 52 | 65 63 20 6c 6f 6e 67 44 |ongDateR|ec longD|
|00000270| 61 74 65 3b 0d 09 4c 6f | 6e 67 44 61 74 65 43 76 |ate;..Lo|ngDateCv|
|00000280| 74 20 6c 6f 6e 67 53 65 | 63 73 3b 0d 09 64 6f 75 |t longSe|cs;..dou|
|00000290| 62 6c 65 20 73 65 63 73 | 3b 0d 09 73 74 61 74 69 |ble secs|;..stati|
|000002a0| 63 20 44 61 74 65 43 61 | 63 68 65 52 65 63 6f 72 |c DateCa|cheRecor|
|000002b0| 64 20 74 68 65 43 61 63 | 68 65 3b 0d 09 73 74 61 |d theCac|he;..sta|
|000002c0| 74 69 63 20 42 6f 6f 6c | 65 61 6e 20 66 69 72 73 |tic Bool|ean firs|
|000002d0| 74 54 69 6d 65 3d 31 3b | 0d 09 69 6e 74 20 65 72 |tTime=1;|..int er|
|000002e0| 72 6f 72 3b 0d 09 6c 6f | 6e 67 20 75 73 65 64 3b |ror;..lo|ng used;|
|000002f0| 0d 09 0d 09 6c 6f 6e 67 | 44 61 74 65 2e 6c 64 2e |....long|Date.ld.|
|00000300| 65 72 61 3d 6c 6f 6e 67 | 44 61 74 65 2e 6c 64 2e |era=long|Date.ld.|
|00000310| 79 65 61 72 3d 6c 6f 6e | 67 44 61 74 65 2e 6c 64 |year=lon|gDate.ld|
|00000320| 2e 6d 6f 6e 74 68 3d 6c | 6f 6e 67 44 61 74 65 2e |.month=l|ongDate.|
|00000330| 6c 64 2e 64 61 79 3d 30 | 3b 0d 09 6c 6f 6e 67 44 |ld.day=0|;..longD|
|00000340| 61 74 65 2e 6c 64 2e 68 | 6f 75 72 3d 6c 6f 6e 67 |ate.ld.h|our=long|
|00000350| 44 61 74 65 2e 6c 64 2e | 6d 69 6e 75 74 65 3d 6c |Date.ld.|minute=l|
|00000360| 6f 6e 67 44 61 74 65 2e | 6c 64 2e 73 65 63 6f 6e |ongDate.|ld.secon|
|00000370| 64 3d 6c 6f 6e 67 44 61 | 74 65 2e 6c 64 2e 64 61 |d=longDa|te.ld.da|
|00000380| 79 4f 66 57 65 65 6b 3d | 30 3b 0d 09 69 66 28 66 |yOfWeek=|0;..if(f|
|00000390| 69 72 73 74 54 69 6d 65 | 29 7b 0d 09 09 49 6e 69 |irstTime|){...Ini|
|000003a0| 74 44 61 74 65 43 61 63 | 68 65 28 26 74 68 65 43 |tDateCac|he(&theC|
|000003b0| 61 63 68 65 29 3b 0d 09 | 09 66 69 72 73 74 54 69 |ache);..|.firstTi|
|000003c0| 6d 65 3d 30 3b 0d 09 7d | 0d 09 65 72 72 6f 72 3d |me=0;..}|..error=|
|000003d0| 53 74 72 69 6e 67 32 44 | 61 74 65 28 73 74 72 69 |String2D|ate(stri|
|000003e0| 6e 67 2c 73 74 72 6c 65 | 6e 28 73 74 72 69 6e 67 |ng,strle|n(string|
|000003f0| 29 2c 26 74 68 65 43 61 | 63 68 65 2c 26 75 73 65 |),&theCa|che,&use|
|00000400| 64 2c 26 6c 6f 6e 67 44 | 61 74 65 29 3b 0d 09 2a |d,&longD|ate);..*|
|00000410| 64 61 74 65 50 74 72 3d | 6c 6f 6e 67 44 61 74 65 |datePtr=|longDate|
|00000420| 2e 6f 64 2e 6f 6c 64 44 | 61 74 65 3b 0d 09 69 66 |.od.oldD|ate;..if|
|00000430| 28 65 72 72 6f 72 29 72 | 65 74 75 72 6e 20 30 2e |(error)r|eturn 0.|
|00000440| 2f 30 2e 3b 0d 09 4c 6f | 6e 67 44 61 74 65 32 53 |/0.;..Lo|ngDate2S|
|00000450| 65 63 73 28 26 6c 6f 6e | 67 44 61 74 65 2c 28 4c |ecs(&lon|gDate,(L|
|00000460| 6f 6e 67 44 61 74 65 54 | 69 6d 65 20 2a 29 26 6c |ongDateT|ime *)&l|
|00000470| 6f 6e 67 53 65 63 73 29 | 3b 0d 09 73 65 63 73 3d |ongSecs)|;..secs=|
|00000480| 48 69 57 6f 72 64 28 6c | 6f 6e 67 53 65 63 73 2e |HiWord(l|ongSecs.|
|00000490| 68 6c 2e 6c 48 69 67 68 | 29 3b 0d 09 73 65 63 73 |hl.lHigh|);..secs|
|000004a0| 2a 3d 28 64 6f 75 62 6c | 65 29 30 78 31 30 30 30 |*=(doubl|e)0x1000|
|000004b0| 30 3b 0d 09 73 65 63 73 | 2b 3d 28 75 6e 73 69 67 |0;..secs|+=(unsig|
|000004c0| 6e 65 64 29 4c 6f 57 6f | 72 64 28 6c 6f 6e 67 53 |ned)LoWo|rd(longS|
|000004d0| 65 63 73 2e 68 6c 2e 6c | 48 69 67 68 29 3b 0d 09 |ecs.hl.l|High);..|
|000004e0| 73 65 63 73 2a 3d 28 64 | 6f 75 62 6c 65 29 30 78 |secs*=(d|ouble)0x|
|000004f0| 31 30 30 30 30 3b 0d 09 | 73 65 63 73 2b 3d 28 75 |10000;..|secs+=(u|
|00000500| 6e 73 69 67 6e 65 64 29 | 48 69 57 6f 72 64 28 6c |nsigned)|HiWord(l|
|00000510| 6f 6e 67 53 65 63 73 2e | 68 6c 2e 6c 4c 6f 77 29 |ongSecs.|hl.lLow)|
|00000520| 3b 0d 09 73 65 63 73 2a | 3d 28 64 6f 75 62 6c 65 |;..secs*|=(double|
|00000530| 29 30 78 31 30 30 30 30 | 3b 0d 09 73 65 63 73 2b |)0x10000|;..secs+|
|00000540| 3d 28 75 6e 73 69 67 6e | 65 64 29 4c 6f 57 6f 72 |=(unsign|ed)LoWor|
|00000550| 64 28 6c 6f 6e 67 53 65 | 63 73 2e 68 6c 2e 6c 4c |d(longSe|cs.hl.lL|
|00000560| 6f 77 29 3b 0d 09 72 65 | 74 75 72 6e 20 73 65 63 |ow);..re|turn sec|
|00000570| 73 3b 0d 7d 00 00 00 00 | 00 00 00 00 00 00 00 00 |s;.}....|........|
|00000580| 00 00 01 00 00 00 01 6e | 00 00 00 6e 00 00 00 3e |.......n|...n...>|
|00000590| a7 7e a7 c0 a8 02 a8 46 | a8 96 a8 e8 a9 36 a9 78 |.~.....F|.....6.x|
|000005a0| a9 c2 aa 0a aa 52 aa a2 | aa ea ab 32 ab 76 ab c4 |.....R..|...2.v..|
|000005b0| 0e 53 74 72 69 6e 67 54 | 6f 44 61 74 65 2e 63 44 |.StringT|oDate.cD|
|000005c0| 02 00 00 00 54 45 58 54 | 4b 41 48 4c 00 00 00 00 |....TEXT|KAHL....|
|000005d0| 00 00 54 45 58 54 4b 41 | 48 4c 00 00 00 00 00 00 |..TEXTKA|HL......|
|000005e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005f0| 00 00 a7 e5 d5 cf 00 00 | 00 00 00 00 01 ac b7 0e |........|........|
|00000600| b7 54 b7 9c b7 e8 b8 2c | b8 72 b8 b8 b9 06 b9 4c |.T.....,|.r.....L|
|00000610| b9 92 b9 d8 ba 1c aa a8 | aa e2 ab 20 ab 68 ab a8 |........|... .h..|
|00000620| ab ec ac 2e ac 6e ac ac | ac ea ad 2c ad 6e ad b2 |.....n..|...,.n..|
|00000630| ad f0 ae 30 ae 6c ae b2 | ae f6 af 3a af 7a af bc |...0.l..|...:.z..|
|00000640| af fe b0 44 b0 84 b0 c4 | b1 04 b1 4a b1 88 b1 ca |...D....|...J....|
|00000650| b2 0c b2 48 b2 88 b2 c8 | b3 0e b3 52 b3 90 b3 d4 |...H....|...R....|
|00000660| b4 16 b4 56 b4 a0 b4 e6 | b5 30 b5 7a b5 c8 b6 10 |...V....|.0.z....|
|00000670| b6 5a b6 9c b6 de b7 26 | b7 6e b7 b8 b8 02 b8 4c |.Z.....&|.n.....L|
|00000680| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 8c |...H..Mo|naco....|
|00000690| 01 81 02 0a 01 8c 00 09 | 01 8c 02 0a 00 00 00 00 |........|........|
|000006a0| 00 00 00 00 00 00 00 06 | 00 04 00 50 00 20 01 8d |........|...P. ..|
|000006b0| 02 3d 00 50 00 20 01 8d | 02 3d a4 dc 72 eb 00 00 |.=.P. ..|.=..r...|
|000006c0| 00 12 00 00 00 67 00 00 | 07 17 01 00 00 00 00 1e |.....g..|........|
|000006d0| 00 50 00 20 01 8d 02 3d | 00 50 00 20 01 8d 02 3d |.P. ...=|.P. ...=|
|000006e0| 00 00 07 17 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006f0| 01 00 00 00 01 6e 00 00 | 00 6e 00 00 00 3e 00 4c |.....n..|.n...>.L|
|00000700| 59 d4 13 d6 00 00 00 1c | 00 3e 00 00 4d 50 53 52 |Y.......|.>..MPSR|
|00000710| 00 01 00 0a 03 ed ff ff | 00 00 00 00 00 00 00 00 |........|........|
|00000720| 03 f0 ff ff 00 00 00 4c | 00 4e 59 68 00 00 00 00 |.......L|.NYh....|
|00000730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000740| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+